<?php

/*
List Trivia Question (admin_list_trivia_questions.php)
*/

$page_title = "List Trivia Questions";
$rank_check = 7;
include "../header.inc.php";

print "$openHTML";

$find_games = mysql_query("SELECT id,gamename FROM trivia_games WHERE game = '$game'");

while ($array = mysql_fetch_array($find_games))
{
	echo "<p><b>$array[gamename]</b><br>";
	$find_questions = mysql_query("SELECT * FROM trivia_questions WHERE game = '$game' AND trivia_game = '$array[id]'");
	while ($array2 = mysql_fetch_array($find_questions))
	{
		echo " - $array2[question] (<a href=admin_edit_trivia_question.php?game=$game&question=$array2[id]>Edit</a>) (<a href=admin_delete_trivia.pro.php?game=$game&delete_id=$array2[id]>Delete</a>)<br>";
	}
	echo "</p>";
}

print "$closeHTML";
?>
